package com.example.zhidao.model.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

@Component
@Data
public class Comments {
    private String id;
    private String comment;
    private int type;
    private String upuser;//对话的用户
    private String uid;
    private String bid;
    private int good;
    @DateTimeFormat(pattern = "yyyy-dd HH:mm:ss") // 从前端接收数据时，需要进行的转换
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") // 返回到前端时，需要进行的转换
    private Date createtime;
    private String topid;
@TableField(exist = false)
private List<Comments> children;
}
